<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位</title>
    <style>
        .container {
            position: relative;
            width: 200px;
            height: 200px;
            background-color: aqua;
        }
        h2 {
            position: absolute;
            top: 0;
            right: 0;
            padding: 0;
            margin: 0;
        }
        h3 {
            position: absolute;
            bottom: 0;
            left: 0;
            padding: 0;
            margin: 0;
        }
        h4 {
            position: absolute;
            bottom: 0;
            right: 0;
            padding: 0;
            margin: 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>左上角</h1>
        <h2>右上角</h2>
        <h3>左下角</h3>
        <h4>右下角</h4>
    </div>
</body>
</html>